//
//  HomeTransactPersonSectionCollectionViewCell.m
//  ZJControlsClass
//
//  Created by mac on 2024/11/14.
//

#import "HomeTransactPersonSectionCollectionViewCell.h"

@interface HomeTransactPersonSectionCollectionViewCell ()




@end



@implementation HomeTransactPersonSectionCollectionViewCell


- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    
    if (self) {
        
        [self configUI];
        
        
    }
    
    return self;
}


-(void)configUI{
    
    [self.contentView addSubview:self.follewView];
    [self.follewView addSubview:self.titleLabel];
    [self.follewView addSubview:self.doBtn];
    [self.follewView addSubview:self.img];
    
    [self.follewView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.bottom.equalTo(self.contentView);
    }];
    
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.follewView).with.offset(ALIGN_WIDTH_PT(8));
        make.top.equalTo(self.follewView).with.offset(ALIGN_HEIGHT_PT(14));
        make.right.equalTo(self.follewView).with.offset(-ALIGN_WIDTH_PT(8));
    }];
    
    [self.doBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.titleLabel.mas_left);
        make.top.equalTo(self.titleLabel.mas_bottom).with.offset(ALIGN_HEIGHT_PT(20));
        make.size.equalTo(@(CGSizeMake(ALIGN_WIDTH_PT(60), ALIGN_HEIGHT_PT(18))));
    }];
    
    [self.img mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.follewView).with.offset(-ALIGN_WIDTH_PT(8));
        make.bottom.equalTo(self.follewView.mas_bottom).with.offset(-ALIGN_HEIGHT_PT(12));
        make.size.equalTo(@(CGSizeMake(ALIGN_WIDTH_PT(36), ALIGN_WIDTH_PT(36))));
    }];
    
    
    
    
    
    
    
    
    
}

#pragma mark -- 懒加载
-(UIView *)follewView{
    if (!_follewView){
        _follewView = [UIView new];
        _follewView.backgroundColor = COLOR_RGB(233, 249, 251);
        _follewView.layer.cornerRadius = 10;
        _follewView.layer.masksToBounds = YES;
    }
    
    return _follewView;
}

-(UILabel *)titleLabel{
    if (!_titleLabel){
        _titleLabel = [UILabel new];
        _titleLabel.textColor = [UIColor blackColor];
        _titleLabel.font = [UIFont systemFontOfSize:14 weight:0.5];
        _titleLabel.textAlignment = NSTextAlignmentLeft;
        _titleLabel.text = @"单位备案";
        _titleLabel.numberOfLines = 2;
    }
    return _titleLabel;
}

- (UIButton *)doBtn{
    if (!_doBtn){
        _doBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        [_doBtn setTitle:@"进入办理" forState:(UIControlStateNormal)];
        [_doBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
        _doBtn.titleLabel.font = FONT12;
        _doBtn.layer.cornerRadius = 18 / 2;
        _doBtn.layer.masksToBounds = YES;
        _doBtn.backgroundColor = COLOR_RGB(102, 154, 255);
    }
    return _doBtn;
}

-(UIImageView *)img{
    if (!_img){
        _img = [UIImageView new];
        _img.image = [UIImage imageNamed:@""];
    }
    return _img;
}






@end
